package com.yzd.learnjava.reusing;

import com.yzd.learnjava.util.Print;

public class SprinklerSystem {
	private String value1, value2, value3, value4;
	private WaterSource source = new WaterSource();
	private int i;
	private float f ;
	
	public static void main(String[] args) {
		SprinklerSystem ss = new SprinklerSystem();
		Print.print(ss);
	}
	
	@Override
	public String toString() {
		return "value1 = " + value1 + " " + 
				"value2 = " + value2 + " " + 
				"value3 = " + value3 + " " + 
				"value4 = " + value4 + " " + 
				"i = " + i + " f = " + f + " source = " + source;
	}

}

class WaterSource{
	private String s ;
	public WaterSource() {
		Print.print("WaterSource()");
		s = "Constructed";
	}
	
	@Override
	public String toString() {
		return s;
	}
}
